#include<stdio.h>
int  Glade(char ch);
int main()
{
	char a;
	int b;
	double sum = 0;
	for(int i = 0;i<5;i++)
	{
		scanf(" %c",&a);
		b = Glade(a);
		sum += b;
	}
	printf("%.1lf\n",sum/5.0);
	return 0;
}
int  Glade(char ch)
{
	int score = 0;
	if(ch == 'A') {
		score = 95;
	}
	else if(ch == 'B') {
		score = 85;
	}
	else if(ch == 'C') {
		score = 75;
	}
	else if(ch == 'D') {
		score = 65;
	}
	else if(ch == 'E') {
		score = 40;
	}
	return score;
	
}
